<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-US">
<head>
<!-- GenHTML revision 25226-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Java EE 6 APIs in the Java Platform, Standard Edition 6.0 - The Java EE 6 Tutorial</title>
<meta name="robots" content="index,follow">
<meta name="robots" content="index,follow">
<meta name="date" content="2011-03-01">
<link rel="stylesheet" type="text/css" href="css/default.css">
<link rel="stylesheet" type="text/css" href="css/ipg.css">
<link rel="stylesheet" type="text/css" href="css/javaeetutorial.css">
</head>

<body>

<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tbody>
   <tr valign="top">
      <td width="400px"><p class="toc level1"><a href="docinfo.html">Document Information</a></p>
<p class="toc level1 tocsp"><a href="gexaf.html">Preface</a></p>
<p class="toc level1 tocsp"><a href="gfirp.html">Part&nbsp;I&nbsp;Introduction</a></p>
<p class="toc level2"><a href="bnaaw.html">1.&nbsp;&nbsp;Overview</a></p>
<p class="toc level3"><a href="giqvh.html">Java EE 6 Platform Highlights</a></p>
<p class="toc level3"><a href="bnaax.html">Java EE Application Model</a></p>
<p class="toc level3"><a href="bnaay.html">Distributed Multitiered Applications</a></p>
<p class="toc level4"><a href="bnaay.html#bnaba">Security</a></p>
<p class="toc level4"><a href="bnaay.html#bnabb">Java EE Components</a></p>
<p class="toc level4"><a href="bnaay.html#bnabc">Java EE Clients</a></p>
<p class="toc level5"><a href="bnaay.html#bnabd">Web Clients</a></p>
<p class="toc level5"><a href="bnaay.html#bnabf">Application Clients</a></p>
<p class="toc level5"><a href="bnaay.html#bnabe">Applets</a></p>
<p class="toc level5"><a href="bnaay.html#bnabg">The JavaBeans Component Architecture</a></p>
<p class="toc level5"><a href="bnaay.html#bnabh">Java EE Server Communications</a></p>
<p class="toc level4 tocsp"><a href="bnaay.html#bnabj">Web Components</a></p>
<p class="toc level4"><a href="bnaay.html#bnabk">Business Components</a></p>
<p class="toc level4"><a href="bnaay.html#bnabl">Enterprise Information System Tier</a></p>
<p class="toc level3 tocsp"><a href="bnabo.html">Java EE Containers</a></p>
<p class="toc level4"><a href="bnabo.html#bnabp">Container Services</a></p>
<p class="toc level4"><a href="bnabo.html#bnabq">Container Types</a></p>
<p class="toc level3 tocsp"><a href="bnabs.html">Web Services Support</a></p>
<p class="toc level4"><a href="bnabs.html#bnabt">XML</a></p>
<p class="toc level4"><a href="bnabs.html#bnabu">SOAP Transport Protocol</a></p>
<p class="toc level4"><a href="bnabs.html#bnabv">WSDL Standard Format</a></p>
<p class="toc level3 tocsp"><a href="bnabx.html">Java EE Application Assembly and Deployment</a></p>
<p class="toc level3"><a href="bnaby.html">Packaging Applications</a></p>
<p class="toc level3"><a href="bnaca.html">Development Roles</a></p>
<p class="toc level4"><a href="bnaca.html#bnacb">Java EE Product Provider</a></p>
<p class="toc level4"><a href="bnaca.html#bnacc">Tool Provider</a></p>
<p class="toc level4"><a href="bnaca.html#bnacd">Application Component Provider</a></p>
<p class="toc level5"><a href="bnaca.html#bnace">Enterprise Bean Developer</a></p>
<p class="toc level5"><a href="bnaca.html#bnacf">Web Component Developer</a></p>
<p class="toc level5"><a href="bnaca.html#bnacg">Application Client Developer</a></p>
<p class="toc level4 tocsp"><a href="bnaca.html#bnach">Application Assembler</a></p>
<p class="toc level4"><a href="bnaca.html#bnaci">Application Deployer and Administrator</a></p>
<p class="toc level3 tocsp"><a href="bnacj.html">Java EE 6 APIs</a></p>
<p class="toc level4"><a href="bnacj.html#bnacl">Enterprise JavaBeans Technology</a></p>
<p class="toc level4"><a href="bnacj.html#bnacm">Java Servlet Technology</a></p>
<p class="toc level4"><a href="bnacj.html#bnacp">JavaServer Faces Technology</a></p>
<p class="toc level4"><a href="bnacj.html#bnacn">JavaServer Pages Technology</a></p>
<p class="toc level4"><a href="bnacj.html#bnaco">JavaServer Pages Standard Tag Library</a></p>
<p class="toc level4"><a href="bnacj.html#bnadb">Java Persistence API</a></p>
<p class="toc level4"><a href="bnacj.html#bnacr">Java Transaction API</a></p>
<p class="toc level4"><a href="bnacj.html#girbt">Java API for RESTful Web Services</a></p>
<p class="toc level4"><a href="bnacj.html#gjxsd">Managed Beans</a></p>
<p class="toc level4"><a href="bnacj.html#gjxvo">Contexts and Dependency Injection for the Java EE Platform (JSR 299)</a></p>
<p class="toc level4"><a href="bnacj.html#gjxvg">Dependency Injection for Java (JSR 330)</a></p>
<p class="toc level4"><a href="bnacj.html#gjxty">Bean Validation</a></p>
<p class="toc level4"><a href="bnacj.html#bnacq">Java Message Service API</a></p>
<p class="toc level4"><a href="bnacj.html#bnacz">Java EE Connector Architecture</a></p>
<p class="toc level4"><a href="bnacj.html#bnacs">JavaMail API</a></p>
<p class="toc level4"><a href="bnacj.html#girbe">Java Authorization Contract for Containers</a></p>
<p class="toc level4"><a href="bnacj.html#girgp">Java Authentication Service Provider Interface for Containers</a></p>
<div id="scrolltoc" class="onpage">
<p class="toc level3 tocsp"><a href="">Java EE 6 APIs in the Java Platform, Standard Edition 6.0</a></p>
<p class="toc level4"><a href="#bnada">Java Database Connectivity API</a></p>
<p class="toc level4"><a href="#bnadc">Java Naming and Directory Interface API</a></p>
<p class="toc level4"><a href="#bnact">JavaBeans Activation Framework</a></p>
<p class="toc level4"><a href="#bnacu">Java API for XML Processing</a></p>
<p class="toc level4"><a href="#bnacw">Java Architecture for XML Binding</a></p>
<p class="toc level4"><a href="#bnacx">SOAP with Attachments API for Java</a></p>
<p class="toc level4"><a href="#bnacv">Java API for XML Web Services</a></p>
<p class="toc level4"><a href="#bnadd">Java Authentication and Authorization Service</a></p>
</div>
<p class="toc level3 tocsp"><a href="bnadf.html">GlassFish Server Tools</a></p>
<p class="toc level2 tocsp"><a href="gfiud.html">2.&nbsp;&nbsp;Using the Tutorial Examples</a></p>
<p class="toc level1 tocsp"><a href="bnadp.html">Part&nbsp;II&nbsp;The Web Tier</a></p>
<p class="toc level2"><a href="bnadr.html">3.&nbsp;&nbsp;Getting Started with Web Applications</a></p>
<p class="toc level2"><a href="bnaph.html">4.&nbsp;&nbsp;JavaServer Faces Technology</a></p>
<p class="toc level2"><a href="giepx.html">5.&nbsp;&nbsp;Introduction to Facelets</a></p>
<p class="toc level2"><a href="gjddd.html">6.&nbsp;&nbsp;Expression Language</a></p>
<p class="toc level2"><a href="bnaqz.html">7.&nbsp;&nbsp;Using JavaServer Faces Technology in Web Pages</a></p>
<p class="toc level2"><a href="gjcut.html">8.&nbsp;&nbsp;Using Converters, Listeners, and Validators</a></p>
<p class="toc level2"><a href="bnatx.html">9.&nbsp;&nbsp;Developing with JavaServer Faces Technology</a></p>
<p class="toc level2"><a href="gkmaa.html">10.&nbsp;&nbsp;JavaServer Faces Technology Advanced Concepts</a></p>
<p class="toc level2"><a href="bnawo.html">11.&nbsp;&nbsp;Configuring JavaServer Faces Applications</a></p>
<p class="toc level2"><a href="gkiow.html">12.&nbsp;&nbsp;Using Ajax with JavaServer Faces Technology</a></p>
<p class="toc level2"><a href="gkhxa.html">13.&nbsp;&nbsp;Advanced Composite Components</a></p>
<p class="toc level2"><a href="bnavg.html">14.&nbsp;&nbsp;Creating Custom UI Components</a></p>
<p class="toc level2"><a href="bnafd.html">15.&nbsp;&nbsp;Java Servlet Technology</a></p>
<p class="toc level2"><a href="bnaxu.html">16.&nbsp;&nbsp;Internationalizing and Localizing Web Applications</a></p>
<p class="toc level1 tocsp"><a href="bnayk.html">Part&nbsp;III&nbsp;Web Services</a></p>
<p class="toc level2"><a href="gijti.html">17.&nbsp;&nbsp;Introduction to Web Services</a></p>
<p class="toc level2"><a href="bnayl.html">18.&nbsp;&nbsp;Building Web Services with JAX-WS</a></p>
<p class="toc level2"><a href="giepu.html">19.&nbsp;&nbsp;Building RESTful Web Services with JAX-RS</a></p>
<p class="toc level2"><a href="gjjxe.html">20.&nbsp;&nbsp;Advanced JAX-RS Features</a></p>
<p class="toc level2"><a href="gkojl.html">21.&nbsp;&nbsp;Running the Advanced JAX-RS Example Application</a></p>
<p class="toc level1 tocsp"><a href="bnblr.html">Part&nbsp;IV&nbsp;Enterprise Beans</a></p>
<p class="toc level2"><a href="gijsz.html">22.&nbsp;&nbsp;Enterprise Beans</a></p>
<p class="toc level2"><a href="gijre.html">23.&nbsp;&nbsp;Getting Started with Enterprise Beans</a></p>
<p class="toc level2"><a href="gijrb.html">24.&nbsp;&nbsp;Running the Enterprise Bean Examples</a></p>
<p class="toc level2"><a href="bnbpk.html">25.&nbsp;&nbsp;A Message-Driven Bean Example</a></p>
<p class="toc level2"><a href="gkcqz.html">26.&nbsp;&nbsp;Using the Embedded Enterprise Bean Container</a></p>
<p class="toc level2"><a href="gkidz.html">27.&nbsp;&nbsp;Using Asynchronous Method Invocation in Session Beans</a></p>
<p class="toc level1 tocsp"><a href="gjbnr.html">Part&nbsp;V&nbsp;Contexts and Dependency Injection for the Java EE Platform</a></p>
<p class="toc level2"><a href="giwhb.html">28.&nbsp;&nbsp;Introduction to Contexts and Dependency Injection for the Java EE Platform</a></p>
<p class="toc level2"><a href="gjbls.html">29.&nbsp;&nbsp;Running the Basic Contexts and Dependency Injection Examples</a></p>
<p class="toc level2"><a href="gjehi.html">30.&nbsp;&nbsp;Contexts and Dependency Injection for the Java EE Platform: Advanced Topics</a></p>
<p class="toc level2"><a href="gkhre.html">31.&nbsp;&nbsp;Running the Advanced Contexts and Dependency Injection Examples</a></p>
<p class="toc level1 tocsp"><a href="bnbpy.html">Part&nbsp;VI&nbsp;Persistence</a></p>
<p class="toc level2"><a href="bnbpz.html">32.&nbsp;&nbsp;Introduction to the Java Persistence API</a></p>
<p class="toc level2"><a href="gijst.html">33.&nbsp;&nbsp;Running the Persistence Examples</a></p>
<p class="toc level2"><a href="bnbtg.html">34.&nbsp;&nbsp;The Java Persistence Query Language</a></p>
<p class="toc level2"><a href="gjitv.html">35.&nbsp;&nbsp;Using the Criteria API to Create Queries</a></p>
<p class="toc level2"><a href="gkjiq.html">36.&nbsp;&nbsp;Creating and Using String-Based Criteria Queries</a></p>
<p class="toc level2"><a href="gkjjf.html">37.&nbsp;&nbsp;Controlling Concurrent Access to Entity Data with Locking</a></p>
<p class="toc level2"><a href="gkjia.html">38.&nbsp;&nbsp;Improving the Performance of Java Persistence API Applications By Setting a Second-Level Cache</a></p>
<p class="toc level1 tocsp"><a href="gijrp.html">Part&nbsp;VII&nbsp;Security</a></p>
<p class="toc level2"><a href="bnbwj.html">39.&nbsp;&nbsp;Introduction to Security in the Java EE Platform</a></p>
<p class="toc level2"><a href="bncas.html">40.&nbsp;&nbsp;Getting Started Securing Web Applications</a></p>
<p class="toc level2"><a href="bnbyk.html">41.&nbsp;&nbsp;Getting Started Securing Enterprise Applications</a></p>
<p class="toc level1 tocsp"><a href="gijue.html">Part&nbsp;VIII&nbsp;Java EE Supporting Technologies</a></p>
<p class="toc level2"><a href="gijto.html">42.&nbsp;&nbsp;Introduction to Java EE Supporting Technologies</a></p>
<p class="toc level2"><a href="bncih.html">43.&nbsp;&nbsp;Transactions</a></p>
<p class="toc level2"><a href="bncjh.html">44.&nbsp;&nbsp;Resource Connections</a></p>
<p class="toc level2"><a href="bncdq.html">45.&nbsp;&nbsp;Java Message Service Concepts</a></p>
<p class="toc level2"><a href="bncgv.html">46.&nbsp;&nbsp;Java Message Service Examples</a></p>
<p class="toc level2"><a href="gkahp.html">47.&nbsp;&nbsp;Advanced Bean Validation Concepts and Examples</a></p>
<p class="toc level2"><a href="gkeed.html">48.&nbsp;&nbsp;Using Java EE Interceptors</a></p>
<p class="toc level1 tocsp"><a href="gkgjw.html">Part&nbsp;IX&nbsp;Case Studies</a></p>
<p class="toc level2"><a href="gkaee.html">49.&nbsp;&nbsp;Duke's Tutoring Case Study Example</a></p>
<p class="toc level1 tocsp"><a href="idx-1.html">Index</a></p>
</td>
      <td width="10px">&nbsp;</td>
      <td>
         <div class="header">
             <div class="banner">
                <table width="100%" border="0" cellpadding="5" cellspacing="0">
                   <tbody>
                      <tr>
                         <td valign="bottom"><p class="Banner">The Java EE 6 Tutorial
</p></td>
                         <td align="right"  valign="bottom"><img src="graphics/javalogo.png" alt="Java Coffee Cup logo"></td>
                      </tr>
                   </tbody>
                </table>
             </div>

             <div class="header-links">
	         <a href="./index.html">Home</a> | 
<a href="../information/download.html">Download</a> | 
<a href="./javaeetutorial6.pdf">PDF</a> | 
<a href="../information/faq.html">FAQ</a> | 
<a href="http://download.oracle.com/javaee/feedback.htm">Feedback</a>

             </div>
             <div class="navigation">
                 <a href="bnacj.html"><img src="graphics/leftButton.gif" border="0" alt="Previous" title="Previous"></a>
                 <a href="p1.html"><img src="graphics/upButton.gif" border="0" alt="Contents" title="Contents"></a>
                 <a href="bnadf.html"><img src="graphics/rightButton.gif" border="0" alt="Next" title="Next"></a>
             </div>
         </div>

	 <div class="maincontent">      	 
             

<a name="girdr"></a><h2>Java EE 6 APIs in the Java Platform, Standard Edition 6.0</h2>
<p>Several APIs that are required by the Java EE 6 platform are included
in the Java Platform, Standard Edition 6.0 (Java SE 6) platform and are
thus available to Java EE applications.</p>



<a name="bnada"></a><h3>Java Database Connectivity API</h3>
<a name="indexterm-100"></a><a name="indexterm-101"></a><a name="indexterm-102"></a><p>The Java Database Connectivity (JDBC) API lets you invoke SQL commands from Java
programming language methods. You use the JDBC API in an enterprise bean when
you have a session bean access the database. You can also use the
JDBC API from a servlet or a JSP page to access the
database directly without going through an enterprise bean.</p>

<p>The JDBC API has two parts:</p>


<ul><li><p>An application-level interface used by the application components to access a database</p>

</li>
<li><p>A service provider interface to attach a JDBC driver to the Java EE platform</p>

</li></ul>


<a name="bnadc"></a><h3>Java Naming and Directory Interface API</h3>
<a name="indexterm-103"></a><a name="indexterm-104"></a><a name="indexterm-105"></a><p>The Java Naming and Directory Interface (JNDI) API provides naming and directory functionality,
enabling applications to access multiple naming and directory services, including existing naming and
directory services, such as LDAP, NDS, DNS, and NIS. The JNDI API provides
applications with methods for performing standard directory operations, such as associating attributes with objects
and searching for objects using their attributes. Using JNDI, a Java EE application
can store and retrieve any type of named Java object, allowing Java EE
applications to coexist with many legacy applications and systems.</p>

<p><a name="indexterm-106"></a><a name="indexterm-107"></a><a name="indexterm-108"></a><a name="indexterm-109"></a>Java EE naming services provide application clients, enterprise beans, and web components with
access to a JNDI naming environment. A <b>naming environment</b> allows a component to be customized
without the need to access or change the component&rsquo;s source code. A container
implements the component&rsquo;s environment and provides it to the component as a JNDI
<b>naming context</b>.</p>

<p><a name="indexterm-110"></a><a name="indexterm-111"></a>A Java EE component can locate its environment naming context by using JNDI
interfaces. A component can create a <tt>javax.naming.InitialContext</tt> object and look up the
environment naming context in <tt>InitialContext</tt> under the name <tt>java:comp/env</tt>. A component&rsquo;s naming environment is stored
directly in the environment naming context or in any of its direct or
indirect subcontexts.</p>

<p><a name="indexterm-112"></a><a name="indexterm-113"></a><a name="indexterm-114"></a>A Java EE component can access named system-provided and user-defined objects. The names
of system-provided objects, such as JTA <tt>UserTransaction</tt> objects, are stored in the environment naming
context <tt>java:comp/env</tt>. The Java EE platform allows a component to name user-defined objects,
such as enterprise beans, environment entries, JDBC <tt>DataSource</tt> objects, and message connections. An object
should be named within a subcontext of the naming environment according to the
type of the object. For example, enterprise beans are named within the subcontext
<tt>java:comp/env/ejb</tt>, and JDBC <tt>DataSource</tt> references are named within the subcontext <tt>java:comp/env/jdbc</tt>.</p>



<a name="bnact"></a><h3>JavaBeans Activation Framework</h3>
<a name="indexterm-115"></a><a name="indexterm-116"></a><a name="indexterm-117"></a><p>The JavaBeans Activation Framework (JAF) is used by the JavaMail API. JAF provides
standard services to determine the type of an arbitrary piece of data, encapsulate
access to it, discover the operations available on it, and create the appropriate
JavaBeans component to perform those operations.</p>



<a name="bnacu"></a><h3>Java API for XML Processing</h3>
<a name="indexterm-118"></a><a name="indexterm-119"></a><p>The Java API for XML Processing (JAXP), part of the Java SE
platform, supports the processing of XML documents using Document Object Model (DOM), Simple API
for XML (SAX), and Extensible Stylesheet Language Transformations (XSLT). JAXP enables applications to
parse and transform XML documents independently of a particular XML processing implementation.</p>

<p><a name="indexterm-120"></a>JAXP also provides namespace support, which lets you work with schemas that might
otherwise have naming conflicts. Designed to be flexible, JAXP lets you use any
XML-compliant parser or XSL processor from within your application and supports the Worldwide
Web Consortium (W3C) schema. You can find information on the W3C schema at
this URL: <a href="http://www.w3.org/XML/Schema">http://www.w3.org/XML/Schema</a>.</p>



<a name="bnacw"></a><h3>Java Architecture for XML Binding</h3>
<a name="indexterm-121"></a><a name="indexterm-122"></a><p>The Java Architecture for XML Binding (JAXB) provides a convenient way to bind
an XML schema to a representation in Java language programs. JAXB can be
used independently or in combination with JAX-WS, where it provides a standard data
binding for web service messages. All Java EE application client containers, web containers,
and EJB containers support the JAXB API.</p>



<a name="bnacx"></a><h3>SOAP with Attachments API for Java</h3>
<a name="indexterm-123"></a><a name="indexterm-124"></a><a name="indexterm-125"></a><p>The SOAP with Attachments API for Java (SAAJ) is a low-level API
on which JAX-WS depends. SAAJ enables the production and consumption of messages that conform
to the SOAP 1.1 and 1.2 specifications and SOAP with Attachments note. Most
developers do not use the SAAJ API, instead using the higher-level JAX-WS API.</p>



<a name="bnacv"></a><h3>Java API for XML Web Services</h3>
<a name="indexterm-126"></a><a name="indexterm-127"></a><p>The Java API for XML Web Services (JAX-WS) specification provides support for web
services that use the JAXB API for binding XML data to Java
objects. The JAX-WS specification defines client APIs for accessing web services as well as
techniques for implementing web service endpoints. The Implementing Enterprise Web Services specification describes
the deployment of JAX-WS-based services and clients. The EJB and Java Servlet specifications
also describe aspects of such deployment. It must be possible to deploy JAX-WS-based
applications using any of these deployment models.</p>

<p>The JAX-WS specification describes the support for message handlers that can process message
requests and responses. In general, these message handlers execute in the same container
and with the same privileges and execution context as the JAX-WS client or
endpoint component with which they are associated. These message handlers have access to
the same JNDI <tt>java:comp/env</tt> namespace as their associated component. Custom serializers and deserializers,
if supported, are treated in the same way as message handlers.</p>



<a name="bnadd"></a><h3>Java Authentication and Authorization Service</h3>
<a name="indexterm-128"></a><a name="indexterm-129"></a><a name="indexterm-130"></a><p>The Java Authentication and Authorization Service (JAAS) provides a way for a Java
EE application to authenticate and authorize a specific user or group of users
to run it.</p>

<p>JAAS is a Java programming language version of the standard Pluggable Authentication Module
(PAM) framework, which extends the Java Platform security architecture to support user-based authorization.</p>


         </div>
         <div class="navigation">
             <a href="bnacj.html"><img src="graphics/leftButton.gif" border="0" alt="Previous" title="Previous"></a>
             <a href="p1.html"><img src="graphics/upButton.gif" border="0" alt="Contents" title="Contents"></a>
             <a href="bnadf.html"><img src="graphics/rightButton.gif" border="0" alt="Next" title="Next"></a>
         </div>

         <div class="copyright">
      	    <p>Copyright &copy; 2011, Oracle and/or its affiliates. All rights reserved. <a href="docinfo.html">Legal Notices</a></p>
      	 </div>

      </td>
   </tr>
</tbody>
</table>
</body>
</html>

